import request from '../utils/request';
import { authUrl, mapsUrl } from './setting';


export async function fakeAccountLogin(params) {
    return request(`${authUrl}/v1/token`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}


/* /v1/admin/example/user/login */
export async function fakeRegister(params) {
    return request('/api/register', {
        method: 'POST',
        body: params,
    });
}

export async function queryNotices() {
    return request('/api/notices');
}


export async function bbxmList(params) {
    return request(`${mapsUrl}/v1/admin/bbxm/list`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}
export async function bbxmAdd(params) {
    return request(`${mapsUrl}/v1/admin/bbxm/add`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}
export async function bbxmEdit(params) {
    return request(`${mapsUrl}/v1/admin/bbxm/update`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}

export async function bbxmDel(params) {
    return request(`${mapsUrl}/v1/admin/bbxm/delete/${params.id}`, {
        method: 'POST',
    });
}


export async function zjqList(params) {
    return request(`${mapsUrl}/v1/admin/zjq/list`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}
export async function zjqAdd(params) {
    return request(`${mapsUrl}/v1/admin/zjq/add`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}
export async function zjqEdit(params) {
    return request(`${mapsUrl}/v1/admin/zjq/update`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}

export async function zjqDel(params) {
    return request(`${mapsUrl}/v1/admin/zjq/delete/${params.id}`, {
        method: 'POST',
    });
}


export async function ncjxqList(params) {
    return request(`${mapsUrl}/v1/admin/ncjxq/list`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}
export async function ncjxqAdd(params) {
    return request(`${mapsUrl}/v1/admin/ncjxq/add`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}
export async function ncjxqEdit(params) {
    return request(`${mapsUrl}/v1/admin/ncjxq/update`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}

export async function ncjxqDel(params) {
    return request(`${mapsUrl}/v1/admin/ncjxq/delete/${params.id}`, {
        method: 'POST',
    });
}






export async function czjxqList(params) {
    return request(`${mapsUrl}/v1/admin/czjxq/list`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}
export async function czjxqAdd(params) {
    return request(`${mapsUrl}/v1/admin/czjxq/add`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}
export async function czjxqEdit(params) {
    return request(`${mapsUrl}/v1/admin/czjxq/update`, {
        method: 'POST',
        body: {
            ...params,
        },
    });
}

export async function czjxqDel(params) {
    return request(`${mapsUrl}/v1/admin/czjxq/delete/${params.id}`, {
        method: 'POST',
    });
}



